﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Qianli.DirSir.DAL;
using Qianli.DirSir.Model;

namespace Qianli.DirSir.BLL
{
    public class StockOrderInfoBLL
    {
        StockOrderInfoDAL dal = new StockOrderInfoDAL();
        /// <summary>
        /// 获取供应商信息，填充到下拉列表中
        /// </summary>
        /// <returns></returns>
        public List<ProviderInfo> GetProviderInfo()
        {
            return dal.GetProviderInfo();
        }
        /// <summary>
        /// 采购订单显示
        /// </summary>
        /// <returns></returns>
        public List<StockOrderInfo> StockOrderInfoShow()
        {
            return dal.StockOrderInfoShow();
        }
        /// <summary>
        /// 采购订单添加
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        public List<int> AddStockOrderInfo(StockOrderInfo StockOrderInfo, List<PurchaseOrderSheetInfo> listPurchaseOrderSheetInfo)
        {
            return dal.AddStockOrderInfo(StockOrderInfo, listPurchaseOrderSheetInfo);
        }
        /// <summary>
        /// 采购订单表删除
        /// </summary>
        /// <returns></returns>
        public List<int> DelStockOrderInfo(int StockOrderID)
        {
            return dal.DelStockOrderInfo(StockOrderID);
        }
        /// <summary>
        /// 查看订单子表详细信息
        /// </summary>
        /// <param name="StockOrderID"></param>
        /// <returns></returns>
        public List<PurchaseOrderSheetInfo> GetlistPurchaseOrderSheetInfoByStockOrderID(int StockOrderID)
        {
            return dal.GetlistPurchaseOrderSheetInfoByStockOrderID(StockOrderID);
        }
        /// <summary>
        /// 获取采购订单主表信息
        /// </summary>
        /// <param name="StockOrderID"></param>
        /// <returns></returns>
        public StockOrderInfo GetStockOrderByStockOrderID(int StockOrderID)
        {
            return dal.GetStockOrderByStockOrderID(StockOrderID);
        }
        /// <summary>
        /// 修改采购订单信息
        /// </summary>
        /// <returns></returns>
        public List<int> UpdatePurchaseOrderSheetInfo(StockOrderInfo s, List<PurchaseOrderSheetInfo> listPurchaseOrderSheetInfo)
        {
            return dal.UpdatePurchaseOrderSheetInfo(s, listPurchaseOrderSheetInfo);
        }
        /// <summary>
        /// 根据采购订单模糊查询
        /// </summary>
        /// <param name="StockOrderName"></param>
        /// <returns></returns>
        public List<StockOrderInfo> GetStockOrderByStockOrderName(string DocumentsCoding)
        {
            return dal.GetStockOrderByStockOrderName(DocumentsCoding);
        }
    }
}
